package com.ruoyi.common.core.domain.model;

import com.ruoyi.common.constant.UserConstants;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;

/**
 * 用户无密码登录对象
 */
@Data
public class LoginNoPasswordBody {

    /**
     * 手机号
     */
    @NotBlank(message = "{user.phonenumber.not.blank}")
    @Length(min = UserConstants.PHONENUMBER_LENGTH, max = UserConstants.PHONENUMBER_LENGTH, message = "{user.phonenumber.length.valid}")
    private String phonenumber;

    /**
     * 鉴权分配token
     */
    @NotBlank(message = "鉴权token不能为空")
    private String authToken;
}
